﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="Phim.aspx.cs" Inherits="Admin_Phim" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table cellpadding="0" cellspacing="0" class="style3">
        <tr>
            <td>
                <table cellpadding="0" cellspacing="0" class="style3" style="width: 779px" 
                    width="800">
                    <tr>
                        <td align="left" style="width: 104px">
                            Phim :</td>
                        <td align="left">
                            <asp:TextBox ID="TextBox1" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 200px" width="200">
                            Loại Phim :</td>
                        <td align="left">
                            <asp:DropDownList ID="DropDownList4" runat="server" Width="150px" 
                                AppendDataBoundItems="True">
                                <asp:ListItem Value="0">---Loai Phim---</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 200px" width="200">
                            Quốc gia :</td>
                        <td align="left">
                            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 200px" width="200">
                            Diễn viên :</td>
                        <td align="left">
                            <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 104px">
                            &nbsp;</td>
                        <td>
                            <asp:Button ID="BtnTim" runat="server" Text="Tìm" Width="77px" 
                                onclick="BtnTim_Click" CausesValidation="False" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 104px">
                            &nbsp;</td>
                        <td>
                            <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table class="style3">
                    <tr>
                        <td>
                <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
                                onrowcancelingedit="GridView5_RowCancelingEdit" 
                                onrowediting="GridView5_RowEditing" onrowupdating="GridView5_RowUpdating" 
                                DataKeyNames="MaLoai,MaTL,HinhAnh" AllowPaging="True" PageSize="5" 
                                onpageindexchanging="GridView5_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MaPhim" HeaderText="Mã Phim" ReadOnly="True" />
                        <asp:BoundField DataField="TenPhim" HeaderText="Tên Phim" />
                        <asp:TemplateField HeaderText="Loại CD">
                            <EditItemTemplate>
                                <asp:DropDownList ID="DropDownList1" runat="server">
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("TenLoai") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Loại Phim">
                            <EditItemTemplate>
                                <asp:DropDownList ID="DropDownList2" runat="server">
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("TenTL") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="DienVien" HeaderText="Diễn viên" />
                        <asp:BoundField DataField="SoTap" HeaderText="Số tập" />
                        <asp:BoundField DataField="SoBanSao" HeaderText="Số bản sao" />
                        <asp:TemplateField HeaderText="Hình ảnh">
                            <EditItemTemplate>
                                &nbsp;
                                <asp:FileUpload ID="FileUpload1" runat="server" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Image ID="Image1" runat="server" 
                                    ImageUrl='<%# Eval("HinhAnh","~/Pictures/CD/{0}") %>' Height="165px" 
                                    Width="130px" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="GioiThieu" HeaderText="Nội dung" />
                        <asp:BoundField DataField="NamSX" HeaderText="Năm sản xuất" />
                        <asp:BoundField DataField="QuocGia" HeaderText="Quốc Gia" />
                        <asp:CommandField CancelText="Hủy" EditText="Sửa" ShowEditButton="True" 
                            UpdateText="Lưu" />
                    </Columns>
                </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:Button ID="btnThem" runat="server" Text="Thêm" onclick="btnThem_Click" 
                                CausesValidation="False" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="Button1" runat="server" Text="Xoá" Width="50px" 
                                onclick="Button1_Click" />
                            </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>

